const Tabbar = () =>
    import ('@/components/Tabbar/');

export default [
    // 首页
    {
        path: '/home',
        name: 'home',
        components: {
            default: () =>
                import ('@/views/home/index'),
            tabbar: Tabbar
        },
        meta: {
            keepAlive: true,
            tabbarName: "home"
        }
    },
    // 列表页
    {
        path: '/listMore',
        name: 'listMore',
        components: {
            default: () =>
                import ('@/views/home/listMore'),
        }
    },
    {
        path: '/list',
        name: 'list',
        components: {
            default: () =>
                import ('@/views/home/list'),
        }
    },
    {
        path: '/moreSearch',
        name: 'moreSearch',
        components: {
            default: resolve => (require(["@/views/home/search"], resolve)),
        },
    },
    {
        path: '/searchIndex',
        name: 'searchIndex',
        components: {
            default: () =>
                import ('@/views/home/searchIndex'),
        },
    },
    {
        path: '/searchResult',
        name: 'searchResult',
        components: {
            default: () =>
                import ('@/views/home/searchResult'),
        }
    },
    {
        path: '/singleSearch',
        name: 'singleSearch',
        components: {
            default: () =>
                import ('@/views/home/singleSearch'),
        }
    },
    {
        path: '/detail',
        name: 'detail',
        components: {
            default: () =>
                import ('@/views/home/detail'),
        }
    },
    {
        path: '/cnkiDetail',
        name: 'cnkiDetail',
        components: {
            default: () =>
                import ('@/views/home/cnkiDetail'),
        }
    },
    {
        path: '*',
        redirect: {
            name: 'home'
        }
    }
];